<html>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1">
  <title>Contents.m</title>
<link rel="stylesheet" type="text/css" href="../stpr.css">
</head>
<body>
<table  border=0 width="100%" cellpadding=0 cellspacing=0><tr valign="baseline">
<td valign="baseline" class="function"><b class="function">WEAKLEARNER</b>
<td valign="baseline" align="right" class="function"><a href="../misc/index.html" target="mdsdir"><img border = 0 src="../up.gif"></a></table>
  <p><b>Produce classifier thresholding single feature.</b></p>
  <hr>
<div class='code'><code>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Synopsis:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;weaklearner(data)</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Description:</span></span><br>
<span class=help>&nbsp;&nbsp;This&nbsp;function&nbsp;produce&nbsp;a&nbsp;weak&nbsp;binary&nbsp;classifier&nbsp;which&nbsp;assigns</span><br>
<span class=help>&nbsp;&nbsp;input&nbsp;vector&nbsp;x&nbsp;to&nbsp;classes&nbsp;[1,2]&nbsp;based&nbsp;on&nbsp;thresholding&nbsp;a&nbsp;single&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;feature.&nbsp;The&nbsp;output&nbsp;is&nbsp;a&nbsp;model&nbsp;which&nbsp;defines&nbsp;the&nbsp;threshold&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;and&nbsp;feature&nbsp;index&nbsp;such&nbsp;that&nbsp;the&nbsp;weighted&nbsp;error&nbsp;is&nbsp;minimized.</span><br>
<span class=help>&nbsp;&nbsp;This&nbsp;weak&nbsp;learner&nbsp;can&nbsp;be&nbsp;used&nbsp;with&nbsp;the&nbsp;AdaBoost&nbsp;classifier</span><br>
<span class=help>&nbsp;&nbsp;(see&nbsp;'help&nbsp;adaboost')&nbsp;as&nbsp;a&nbsp;feature&nbsp;selection&nbsp;method.</span><br>
<span class=help>&nbsp;&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Input:</span></span><br>
<span class=help>&nbsp;&nbsp;data&nbsp;[struct]&nbsp;Training&nbsp;data:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.X&nbsp;[dim&nbsp;x&nbsp;num_data]&nbsp;Training&nbsp;vectors.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.y&nbsp;[1&nbsp;x&nbsp;num_data]&nbsp;Binary&nbsp;labels&nbsp;(1&nbsp;or&nbsp;2).</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.D&nbsp;[1&nbsp;x&nbsp;num_data]&nbsp;Weights&nbsp;of&nbsp;training&nbsp;vectors&nbsp;(optional).</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;not&nbsp;given&nbsp;then&nbsp;D&nbsp;is&nbsp;set&nbsp;to&nbsp;be&nbsp;uniform&nbsp;distribution.</span><br>
<span class=help>&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Output:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;[struct]&nbsp;Binary&nbsp;linear&nbsp;classifier:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.W&nbsp;[dim&nbsp;x&nbsp;1]&nbsp;Normal&nbsp;vector&nbsp;of&nbsp;hyperplane.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.b&nbsp;[1x1]&nbsp;Bias&nbsp;of&nbsp;the&nbsp;hyperplane.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.fun&nbsp;=&nbsp;'linclass'.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Example:</span></span><br>
<span class=help>&nbsp;&nbsp;help&nbsp;adaboost</span><br>
<span class=help></span><br>
<span class=help>&nbsp;See&nbsp;also:&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;ADABOOST,&nbsp;ADACLASS.</span><br>
<span class=help>&nbsp;</span><br>
</code></div>
  <hr>
  <b>Source:</b> <a href= "../misc/list/weaklearner_fast.html">weaklearner_fast.m</a>
  <p><b class="info_field">About: </b>  Statistical Pattern Recognition Toolbox<br>
 (C) 1999-2004, Written by Vojtech Franc and Vaclav Hlavac<br>
 <a href="http://www.cvut.cz">Czech Technical University Prague</a><br>
 <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a><br>
 <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a><br>

  <p><b class="info_field">Modifications: </b> <br>
 31-jan-2007, VF, careful handling the bias value<br>
 01-dec-2006, SC, sharat@mit.edu; wrote fast version<br>
 25-aug-2004, VF<br>
 11-aug-2004, VF<br>

</body>
</html>
